import Vue from 'vue'
import Router from 'vue-router'
import index from '@//view'
import ListIndex from '@/components/list/index'
import login from "@//view/Login";
import Test from "@//view/Test"
import Register from "@//view/Register";
import SubmitRes from "@//view/SubmitRes";
import SoftDetail from "@//components/detail/SoftDetail";
import SoftDetailSpider from "@//components/detail/SoftDetailSpider";
import ListContent from "@//components/list/ListContent";
import TopicRes from "@//components/index/TopicRes";

Vue.use(Router)

export default new Router({
  routes: [
    {
      name: 'topic',
      path: '/topic/:cat',
      component: TopicRes
    },
    {
      name: 'category',
      path: '/category/:cat',
      component: ListIndex
    },
    {
      path: '/softDetail',
      name: 'softDetail',
      component: SoftDetail
    },
    {
      path: '/softDetailSpider',
      name: 'softDetailSpider',
      component: SoftDetailSpider
    },
    {
      path: '/submitRes',
      name: 'submitRes',
      component: SubmitRes
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/',
      name: 'index',
      component: index,
      children:[
        {
          name: 'indexCategory',
          path: '/category/:cat',
          component: ListContent
        },
      ]
    },
    {
      path: '/list',
      name: 'ListIndex',
      component: ListIndex
    },
    {
      path: '/test',
      name: 'Test',
      component: Test
    },
  ]
})
